GtkAccessible is an interface for accessible UI elements.
Currently, it doesn't do much except exist as a type; in the future, it
will be the entry point for all accessible state in GTK.
#include <gtk/gtkaboutdialog.h>
#include <gtk/gtkaccelgroup.h>
#include <gtk/gtkaccellabel.h>
+#include <gtk/gtkaccessible.h>
#include <gtk/gtkactionable.h>
#include <gtk/gtkactionbar.h>
#include <gtk/gtkadjustment.h>
--- /dev/null
+/* gtkaccessible.c: Accessible interface
+ *
+ * Copyright 2020 GNOME Foundation
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "gtkaccessible.h"
+
+G_DEFINE_INTERFACE (GtkAccessible, gtk_accessible, G_TYPE_OBJECT)
+
+static void
+gtk_accessible_default_init (GtkAccessibleInterface *iface)
+{
+}
--- /dev/null
+/* gtkaccessible.h: Accessible interface
+ *
+ * Copyright 2020 GNOME Foundation
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <glib-object.h>
+#include <gtk/gtktypes.h>
+#include <gtk/gtkenums.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_ACCESSIBLE (gtk_accessible_get_type())
+
+GDK_AVAILABLE_IN_ALL
+G_DECLARE_INTERFACE (GtkAccessible, gtk_accessible, GTK, ACCESSIBLE, GObject)
+
+struct _GtkAccessibleInterface
+{
+ GTypeInterface g_iface;
+};
+
+G_END_DECLS
#include "gtkwidgetprivate.h"
#include "gtkaccelgroupprivate.h"
+#include "gtkaccessible.h"
#include "gtkactionobserverprivate.h"
#include "gtkapplicationprivate.h"
#include "gtkbuildable.h"
static void gtk_widget_real_state_flags_changed (GtkWidget *widget,
GtkStateFlags old_state);
+static void gtk_widget_accessible_interface_init (GtkAccessibleInterface *iface);
+
static void gtk_widget_buildable_interface_init (GtkBuildableIface *iface);
static void gtk_widget_buildable_set_name (GtkBuildable *buildable,
const char *name);
NULL, /* value_table */
};
+ const GInterfaceInfo accessible_info =
+ {
+ (GInterfaceInitFunc) gtk_widget_accessible_interface_init,
+ (GInterfaceFinalizeFunc) NULL,
+ NULL,
+ };
+
const GInterfaceInfo buildable_info =
{
(GInterfaceInitFunc) gtk_widget_buildable_interface_init,
GtkWidget_private_offset =
g_type_add_instance_private (widget_type, sizeof (GtkWidgetPrivate));
+ g_type_add_interface_static (widget_type, GTK_TYPE_ACCESSIBLE,
+ &accessible_info);
g_type_add_interface_static (widget_type, GTK_TYPE_BUILDABLE,
- &buildable_info) ;
+ &buildable_info);
g_type_add_interface_static (widget_type, GTK_TYPE_CONSTRAINT_TARGET,
- &constraint_target_info) ;
+ &constraint_target_info);
}
return widget_type;
gtk_widget_set_expand_set (widget, GTK_ORIENTATION_VERTICAL, set);
}
+/*
+ * GtkAccessible implementation
+ */
+static void
+gtk_widget_accessible_interface_init (GtkAccessibleInterface *iface)
+{
+}
+
/*
* GtkBuildable implementation
*/
'gtkaboutdialog.c',
'gtkaccelgroup.c',
'gtkaccellabel.c',
+ 'gtkaccessible.c',
'gtkactionable.c',
'gtkactionbar.c',
'gtkadjustment.c',
'gtkaboutdialog.h',
'gtkaccelgroup.h',
'gtkaccellabel.h',
+ 'gtkaccessible.h',
'gtkactionable.h',
'gtkactionbar.h',
'gtkadjustment.h',